), passing a URL string to these methods in
the initial context results in the use of the URL's scheme id to locate
the context factory for handling that scheme.
This default policy of locating the initial context can be overridden
by calling java.naming.spi.NamingManager.setInitialContextFactoryBuilder().
- See Also:
- Context, setInitialContextFactoryBuilder
-
defaultInitCtx
-
-
gotDefault
-
-
myProps
-
-
InitialContext()
- Constructs an initial context.
-
InitialContext(Properties)
- Constructs an initial context using information supplied in
'environment'.
-
bind(Name, Object)
- Binds 'name' to the object 'obj'.
-
bind(String, Object)
- Binds 'name' to the object 'obj'.
-
createSubcontext(Name)
- Creates a new context with the given name resolved
relative to this initial context and bind it in the target context
(that named by all but terminal atomic component of the name).
-
createSubcontext(String)
- Creates a new context with the given name resolved
relative to this initial context and bind it in the target context
(that named by all but terminal component of the name).
-
destroySubcontext(Name)
- Destory the named context and remove it from the namespace.
-
destroySubcontext(String)
- Destory the named context and remove it from the namespace.
-
getEnvironment()
- Retrieves the environment properties in effect for the initial context.
-
getNameParser(Name)
- Retrieves the parser associated with the named context.
-
getNameParser(String)
- Retrieves the parser associated with the named context.
-
getURLScheme(String)
-
-
list(Name)
- Enumerates the atomic names and the class names of their
bound objects in the context named relative to this initial context.
-
list(String)
- Enumerates the atomic names and the class names of their
bound objects in the context named relative to this initial context.
-
listBindings(Name)
- Enumerates the atomic names and their bound objects in
the context named relative to this initial context.
-
listBindings(String)
- Enumerates the atomic names and their bound objects in
the context named relative to this initial context.
-
lookup(Name)
- Retrieves the object bound to 'name' resolved relative to this
initial context.
-
lookup(String)
- Retrieves the object bound to 'name' resolved relative to the
initial context.
-
lookupLink(Name)
- Looks up 'name' relative to this initial context, following links except
for the last atomic part of name.
-
lookupLink(String)
- Looks up 'name' relative to this initial context, following links except
for the last atomic part of name.
-
rebind(Name, Object)
- Binds 'name' to the object 'obj'.
-
rebind(String, Object)
- Binds 'name' to the object 'obj'.
-
rename(Name, Name)
- Binds 'newName' to the object bound to 'oldName'.
-
rename(String, String)
- Binds 'newName' to the object bound to 'oldName'.
-
setEnvironment(Properties)
- Changes the environment properties of the initial context to be
those specified by envProps.
-
unbind(Name)
- Unbinds 'name' resolved relative to this initial context.
-
unbind(String)
- Unbinds 'name' resolved relative to this initial context.
myProps
protected Properties myProps
defaultInitCtx
protected Context defaultInitCtx
gotDefault
protected boolean gotDefault
InitialContext
public InitialContext()
- Constructs an initial context.
InitialContext
public InitialContext(Properties environment)
- Constructs an initial context using information supplied in
'environment'.
- Parameters:
- environment - Environment properties that may be used in the
construction of the initial context
(such as user name, password, etc.)
getURLScheme
protected static String getURLScheme(String str)
lookup
public Object lookup(String name) throws NamingException
- Retrieves the object bound to 'name' resolved relative to the
initial context.
- Parameters:
- name - The string name to lookup.
- Returns:
- The object bound to 'name'.
lookup
public Object lookup(Name name) throws NamingException
- Retrieves the object bound to 'name' resolved relative to this
initial context.
- Parameters:
- name - The name to lookup.
- Returns:
- The object bound to 'name'.
bind
public void bind(String name,
Object obj) throws NamingException
- Binds 'name' to the object 'obj'.
- Parameters:
- name - The string name to bind. name is resolved
relative to this initial context.
- Throws: NameAlreadyBoundException
- If name is already bound.
bind
public void bind(Name name,
Object obj) throws NamingException
- Binds 'name' to the object 'obj'.
- Parameters:
- name - The name to bind. name is resolved
relative to this initial context.
- Throws: NameAlreadyBoundException
- If name is already bound.
rebind
public void rebind(String name,
Object obj) throws NamingException
- Binds 'name' to the object 'obj'. If name is already bound,
overwrite the existing binding.
- Parameters:
- name - The string name to bind. name is resolved
relative to this initial context.
rebind
public void rebind(Name name,
Object obj) throws NamingException
- Binds 'name' to the object 'obj'. If name is already bound,
overwrite the existing binding.
- Parameters:
- name - The name to bind. name is resolved
relative to this initial context.
unbind
public void unbind(String name) throws NamingException
- Unbinds 'name' resolved relative to this initial context.
- Parameters:
- name - The string name to unbind. name is resolved
relative to this initial context.
unbind
public void unbind(Name name) throws NamingException
- Unbinds 'name' resolved relative to this initial context.
- Parameters:
- name - The name to unbind. name is resolved
relative to this initial context.
rename
public void rename(String oldName,
String newName) throws NamingException
- Binds 'newName' to the object bound to 'oldName'.
- Parameters:
- oldName - The string name of the existing binding.
oldName is resolved relative to this initial context.
- newName - The string name of the new binding.
newName is resolved relative to the target context
(i.e. the context in which oldName is bound).
rename
public void rename(Name oldName,
Name newName) throws NamingException
- Binds 'newName' to the object bound to 'oldName'.
- Parameters:
- oldName - The name of the existing binding.
oldName is resolved relative to this initial context.
- newName - The name of the new binding.
newName is resolved relative to the target context
(i.e. the context in which oldName is bound).
list
public NameClassEnumeration list(String name) throws NamingException
- Enumerates the atomic names and the class names of their
bound objects in the context named relative to this initial context.
- Parameters:
- name - The string name of the context to list.
- Returns:
- An enumeration of the atomic names and class names
of the bindings in this context.
list
public NameClassEnumeration list(Name name) throws NamingException
- Enumerates the atomic names and the class names of their
bound objects in the context named relative to this initial context.
- Parameters:
- name - The name of the context to list.
- Returns:
- An enumeration of the atomic names and class names
of the bindings in this context.
listBindings
public BindingEnumeration listBindings(String name) throws NamingException
- Enumerates the atomic names and their bound objects in
the context named relative to this initial context.
- Parameters:
- name - The string name of the context to list.
- Returns:
- An enumeration of the atomic names and their bound objects.
listBindings
public BindingEnumeration listBindings(Name name) throws NamingException
- Enumerates the atomic names and their bound objects in
the context named relative to this initial context.
- Parameters:
- name - The name of the context to list.
- Returns:
- An enumeration of the atomic names and their bound objects.
destroySubcontext
public void destroySubcontext(String name) throws NamingException
- Destory the named context and remove it from the namespace.
- Parameters:
- name - The string name of the context to be destroyed;
it is resolved relative to this initial context.
destroySubcontext
public void destroySubcontext(Name name) throws NamingException
- Destory the named context and remove it from the namespace.
- Parameters:
- name - The name of the context to be destroyed;
it is resolved relative to this initial context.
createSubcontext
public Context createSubcontext(String name) throws NamingException
- Creates a new context with the given name resolved
relative to this initial context and bind it in the target context
(that named by all but terminal component of the name).
- Parameters:
- name - The string name of the context to create.
- Returns:
- The newly created context.
createSubcontext
public Context createSubcontext(Name name) throws NamingException
- Creates a new context with the given name resolved
relative to this initial context and bind it in the target context
(that named by all but terminal atomic component of the name).
- Parameters:
- name - The name of the context to create.
- Returns:
- The newly created context.
lookupLink
public Object lookupLink(String name) throws NamingException
- Looks up 'name' relative to this initial context, following links except
for the last atomic part of name.
- Parameters:
- name - The string name to look up.
- Returns:
- The object bound to the name by not following the terminal
link (if any).
lookupLink
public Object lookupLink(Name name) throws NamingException
- Looks up 'name' relative to this initial context, following links except
for the last atomic part of name.
- Parameters:
- name - The name to look up.
- Returns:
- The object bound to the name by not following the terminal
link (if any).
getNameParser
public NameParser getNameParser(String name) throws NamingException
- Retrieves the parser associated with the named context.
In a federation of namespaces, different naming systems will
parse names differently. This method allows an application
to get a parser for parsing names in a particular namespace.
- Parameters:
- name - The string name of the context from which to get the parser.
- Returns:
- A name parser that will parse names into their atomic components.
- See Also:
- CompoundName
getNameParser
public NameParser getNameParser(Name name) throws NamingException
- Retrieves the parser associated with the named context.
In a federation of namespaces, different naming systems will
parse names differently. This method allows an application
to get a parser for parsing names in a particular namespace.
- Parameters:
- name - The name of the context from which to get the parser.
- Returns:
- A name parser that will parse names into their atomic components.
- See Also:
- CompoundName
setEnvironment
public Properties setEnvironment(Properties envProps) throws NamingException
- Changes the environment properties of the initial context to be
those specified by envProps. envProps overrides any prior
environment properties with the same property names.
An environment property that could not be satisfied by this context
is silently ignored. setEnvironment() returns the resulting
set of environment properties.
- Parameters:
- envprops - The environment properties to set.
- Returns:
- The resulting environment properties of
this context.
getEnvironment
public Properties getEnvironment() throws NamingException
- Retrieves the environment properties in effect for the initial context.
- Returns:
- The environment properties for the initial context.
All Packages Class Hierarchy This Package Previous Next Index